class MessageLikeCollectListResponse {
  List<MessageLikeCollectResponse> rows;
  int total;

  MessageLikeCollectListResponse({
    required this.rows,
    required this.total,
  });

  factory MessageLikeCollectListResponse.fromJson(Map<String, dynamic> json) =>
      MessageLikeCollectListResponse(
        total: json['total'] as int,
        rows: (json['rows'] as List)
            .map((e) => MessageLikeCollectResponse.fromJson(e))
            .toList(),
      );
}

class MessageLikeCollectResponse {
  int? customerId;
  String? customerName;
  String? avatar;
  String? operateMsg;
  int? noteId;
  String? text;
  String? image;
  String? video;
  String? videoCover;
  String? audio;
  int? audioDuration;
  int officialFlag;
  String? officialName;

  MessageLikeCollectResponse({
    this.customerId,
    this.customerName,
    this.avatar,
    this.operateMsg,
    this.noteId,
    this.text,
    this.image,
    this.video,
    this.videoCover,
    this.audio,
    this.audioDuration,
    this.officialFlag = 0,
    this.officialName,
  });

  factory MessageLikeCollectResponse.fromJson(Map<String, dynamic> json) {
    return MessageLikeCollectResponse(
      customerId: json['customerId'] as int?,
      customerName: json['customerName'] as String?,
      avatar: json['avatar'] as String?,
      operateMsg: json['operateMsg'] as String?,
      noteId: json['noteId'] as int?,
      text: json['text'] as String?,
      image: json['image'] as String?,
      video: json['video'] as String?,
      videoCover: json['videoCover'] as String?,
      audio: json['audio'] as String?,
      audioDuration: json['audioDuration'] as int?,
      officialFlag: (json['officialFlag'] as int?) ?? 0,
      officialName: json['officialName'] as String?,
    );
  }

  Map<String, dynamic> toJson() => {
        'customerId': customerId,
        'customerName': customerName,
        'avatar': avatar,
        'operateMsg': operateMsg,
        'noteId': noteId,
        'text': text,
        'image': image,
        'video': video,
        'videoCover': videoCover,
        'audio': audio,
        'audioDuration': audioDuration,
        'officialFlag': officialFlag,
        'officialName': officialName,
      };
}
